home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / Java2 / src / java / util / ConcurrentModificationExce.java < prev    next >
Encoding:
Java Source  |  1999-05-28  |  1.9 KB  |  59 lines  |  [TEXT/CWIE]

  1. /*
  2.  * @(#)ConcurrentModificationException.java    1.6 98/09/30
  3.  *
  4.  * Copyright 1997, 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.util;
  16.  
  17. /**
  18.  * This exception may be thrown by methods that have detected concurrent
  19.  * modification of a backing object when such modification is not permissible.
  20.  * <p>
  21.  * For example, it is not permssible for one thread to modify a Collection
  22.  * while another thread is iterating over it.  In general, the results of the
  23.  * iteration are undefined under these circumstances.  Some Iterator
  24.  * implementations (including those of all the collection implementations
  25.  * provided by the JDK) may choose to throw this exception if this behavior is
  26.  * detected.  Iterators that do this are known as <i>fail-fast</i> iterators,
  27.  * as they fail quickly and cleanly, rather that risking arbitrary,
  28.  * non-deterministic behavior at an undetermined time in the future.
  29.  *
  30.  * @author  Josh Bloch
  31.  * @version 1.6, 09/30/98
  32.  * @see        Collection
  33.  * @see     Iterator
  34.  * @see     ListIterator
  35.  * @see        Vector
  36.  * @see        LinkedList
  37.  * @see        HashSet
  38.  * @see        Hashtable
  39.  * @see        TreeMap
  40.  * @see        AbstractList
  41.  * @since   JDK1.2
  42.  */
  43. public class ConcurrentModificationException extends RuntimeException {
  44.     /**
  45.      * Constructs a ConcurrentModificationException with no
  46.      * detail message.
  47.      */
  48.     public ConcurrentModificationException() {
  49.     }
  50.  
  51.     /**
  52.      * Constructs a <tt>ConcurrentModificationException</tt> with the
  53.      * specified detail message.
  54.      */
  55.     public ConcurrentModificationException(String message) {
  56.     super(message);
  57.     }
  58. }
  59.